<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<input type="text" id="txt"  />
		<input type="button" id="btn" value="搜索"  />
	</body>
	<script>
		var oTxt = document.getElementById("txt");
		var oBtn = document.getElementById("btn");
		oTxt.onkeyup = function(){
		var sc = document.createElement("script");
		sc.src = "https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd=" + oTxt.value + "^&sugmode=2^&json=1^&p=3^&sid=22832_22162_1446_21091_22918_22158^&req=2^&bs=aaa^&pbs=aaa^&csor=3^&cb=fn";
		document.getElementsByTagName("head")[0].appendChild(sc);
		};
		function fn(str){
			console.log(str.s);
		}
		
	</script>
</html>
